#ifndef _PEDUMPERLEARN_H_
#define _PEDUMPERLEARN_H_

#include <Windows.h>

#include "debugmode.h"

// ...
typedef struct _EXECUTABLEFILE
{
    PVOID ZeroFileOffsetPointer;
    DWORD FileSize;                     // maximum 4 Gb
    HANDLE HandleFile;
    HANDLE HandleMap;
    PIMAGE_NT_HEADERS PEStartPointer;
} EXECUTABLEFILE, *PEXECUTABLEFILE;

//
// Open and map a file
//
// If the function succeeds, the return value is nonzero.
//
BOOLEAN OpenAndMapExecutableFile(
    __in PWCHAR FileName,
    __out PEXECUTABLEFILE
    );

//
// Unmap and close the file
//
// If the function succeeds, the return value is nonzero.
//
BOOLEAN UnMapAndCloseExecutableFile(
    __in PEXECUTABLEFILE
    );

//
// Print headers raw
// 
VOID PrintRawHeaders(
    __in PEXECUTABLEFILE
    );

//
// Print exports raw
//
VOID PrintExportsRaw(
    __in PEXECUTABLEFILE
    );

//
// Print imports raw
//
VOID PrintImportsRaw(
    __in PEXECUTABLEFILE
    );

#endif _PEDUMPERLEARN_H_